<html xmlns="http://www.w3.org/1999/xhtml"><head><style type="text/css">
dt {
  font-style: italic;
  margin-top: 15px;
  margin-bottom: 3px;
  margin-left: 0px;
  border-bottom: 1px dotted black;
}
dd {
  margin-left: 10px;
}
table {
  border-collapse:collapse;
  border: 1px solid black;
  margin-top: 7px;
}
th {
  border: 1px solid black;
  padding: 3 7 3 7;
}
td {
  border: 1px solid black;
  padding: 3 7 3 7;
}
</style></head><body><p><a name="i2f"></a><b>i2f</b> :
  convert integer to float : <a href="opcodes.html">index</a> : <a href="http://asm.objectweb.org/asm40/javadoc/user/org/objectweb/asm/MethodVisitor.html#visitInsn(int)">visitInsn()</a></p><dl><dt>Description</dt><dd>Pops an int off the operand stack, casts it into a single-precision
<i xmlns="">float</i>, and pushes the <i xmlns="">float</i> back onto the stack. Notice that
there is may be a loss of precision (floats have 24 bits of significand, as
compared to 32 bits for an <i xmlns="">int</i>, so the least significant bits of int are
lost). However, the magnitude of the result will be preserved (the range of a
float is greater than the range of an int). Rounding is done using the IEEE 754
round-to-nearest mode.</dd><dt>See also</dt><dd><a href="ref-i2l.html">i2l</a> <a href="ref-.html"></a> <a href="ref-i2d.html">i2d</a> </dd><dt>Stack</dt><dd><table xmlns="">
<tr>
<td>
<b>Before </b>
</td>
<td><b>After</b></td></tr>
<tr>
<td>int</td>
<td>float</td></tr>
<tr>
<td>...</td>
<td>...</td></tr>
</table></dd><dt>Bytecode</dt><dd><table xmlns="">
<tr>
<td>
<b> Type </b>
</td>
<td><b>Description</b></td></tr>
<tr>
<td>
u1 
</td>
<td>i2f
opcode = 0x86 (134)
</td></tr>
</table></dd></dl></body></html>